package com.woniuxy.controller;

import com.woniuxy.entity.TopicMail;
import com.woniuxy.service.DirectService;
import com.woniuxy.service.TopicService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @Author: 马宇航
 * @Description: 直连交换机
 * @DateTime: 22/10/20/0020 10:37
 * @Component: 成都蜗牛学苑
 **/
@Controller
public class TopicController {
    @Autowired
    TopicService topicService;
    @PostMapping("mytopic")
    @ResponseBody
    public void produce(@ModelAttribute("mail") TopicMail mail){
        topicService.sendEmail(mail);
    }
}